/**
 * fshows.com
 * Copyright (C) 2013-2020 All Rights Reserved.
 */
package com.fshows.leshuapay.sdk.enums;

/**
 * 店铺类型枚举
 *
 * @author zhaoyi
 * @version ShopTypeEnum.java, v 0.1 2020-08-03 11:25 zhaoyi
 */
public enum ShopTypeEnum {
    MAIN_STORE(1, "总店"),
    BRANCH_STORE(0, "分店"),
    ;

    private Integer type;
    private String desc;

    ShopTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static ShopTypeEnum getByType(Integer type) {
        ShopTypeEnum[] valueList = ShopTypeEnum.values();
        for (ShopTypeEnum v : valueList) {
            if (v.getType().equals(type)) {
                return v;
            }
        }
        return null;
    }

    /**
     * Getter method for property <tt>type</tt>.
     *
     * @return property value of type
     */
    public Integer getType() {
        return type;
    }

    /**
     * Getter method for property <tt>desc</tt>.
     *
     * @return property value of desc
     */
    public String getDesc() {
        return desc;
    }
}
